#pragma GCC optimize(2)
#include <iostream>
#include <algorithm>
#include <cstring>
#include <string>
#include <map>
#include <vector>

using namespace std;
using LL = long long;

const int N = 1e5 + 10;

int n;
int s[N];
int q[N], cnt;
int res[N], idx;

void solve(){
    cnt = 0, idx = 0;
    cin >> n;
    for(int i = 1; i <= n; i ++) cin >> s[i];

    int fo = 1;
    q[++cnt] = fo;
    for(int i = 2; i <= n; i ++){
        if(s[i] == s[fo]){
            q[++cnt] = i;
        }else{
            if(cnt == 1){
                cout << -1 << '\n';
                return;
            }else{
                for(int i = 2; i <= cnt; i ++) res[++idx] = q[i];
                res[++idx] = q[1];
                cnt = 0;
                q[++cnt] = i;
                fo = i;
            }
        }
    }

    if(cnt == 1){
        cout << -1 << '\n';
        return;
    }
    if(cnt > 0){
        for(int i = 2; i <= cnt; i ++) res[++idx] = q[i];
        res[++idx] = q[1];
    }

    for(int i = 1; i <= idx; i ++) cout << res[i] << " ";
    


    cout << '\n';
}

int main(){
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    int T;
    cin >> T;
    while(T--){
        solve();
    }


    return 0;
}